/**
 * 收藏 Api
 */
import instance from '@/utils/request'

const path = {
  addCollectionUrl: 'userCollectionAndTrail/insertUserCollection', // 新增收藏
  delCollectionUrl: 'userCollectionAndTrail/deleteUserCollection', // 取消收藏
  getUserCollectionListUrl: 'userCollectionAndTrail/getUserCollectionList', // 分页查询
  getUserCollectionUrl: 'userCollectionAndTrail/getUserCollection' // 查询
}

export const addCollectionUrl = (params: any) => {
  return instance({
    url: path.addCollectionUrl,
    method: 'post',
    data: params
  })
}

export const delCollectionUrl = (params: any) => {
  return instance({
    url: path.delCollectionUrl,
    method: 'post',
    data: params
  })
}

export const getUserCollectionListUrl = (params: any) => {
  return instance({
    url: path.getUserCollectionListUrl,
    method: 'post',
    data: params
  })
}

export const getUserCollectionUrl = (params: any) => {
  return instance({
    url: path.getUserCollectionUrl,
    method: 'get',
    params
  })
}
